package com.frozenc.mapper;

import com.frozenc.domain.Category;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.dao.DataAccessException;

import java.util.List;

/**
 * Created by FrozenC on 2016/9/13.
 */
@Mapper
public interface CategoryMapper {

    List<Category> selectAllCategories();

    Category selectCategoryByName(String name);

    Category selectCategoryById(Integer id);

    int insertCategory(String name) throws DataAccessException;

    int updateCategory(Integer id) throws DataAccessException;

    int deleteCategory(Integer id) throws DataAccessException;
}
